package models;

import play.db.jpa.Model;

import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

/**
 * Created by IntelliJ IDEA.
 * User: licco
 * Date: 2017/3/11
 * Time: 上午1:26
 */
@Entity
public class Movie extends Model {

    public String name;
    public String url;

    public enum T {
        MKV {
            @Override
            public String label() {
                return "MKV 无字片源";
            }
        },
        MEDIUM {
            @Override
            public String label() {
                return "720P";
            }
        },
        HIGH {
            @Override
            public String label() {
                return "1080P";
            }
        };

        public abstract String label();
    }

    @Enumerated(EnumType.STRING)
    public T type;

    public String downloadNum;

    public String time;

    public String groupName;

    /**
     * 是否下载过
     */
    public boolean isDownload = false;

}
